<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/public.css" />
    <style>
       #content {
		width: 100%;
		height: 100vh;
		background-color: #f3f3f3;
	}

	.topAlign {
		width: 100%;
		height: 60px;
		line-height: 60px;
		text-align: center;
		background-color: #FFF;
		color: #999999;
		font-size: 13px;
	}


	.oneActive {
		font-size: 16px;
		color: #FF2265;
		font-weight: bold;
		/* border-bottom: 2px solid #FF2265; */
		position: relative;
	}


	.oneActive .line {
		width: 20px;
		height: 3px;
		background: #FF2265;
		border-radius: 2px;
		position: absolute;
		bottom: 0;
		left: 50%;
		transform: translate(-50%, 0);
	}


	.topHead {
		width: calc(100% - 30px);
		height: 60px;
		background: #FF2265;
		padding: 15px;
	}

	.topHead .leftBox {
		width: 70%;
		height: 100%;
	}

	.money {
		font-size: 14px;
		height: 40px;
		line-height: 40px;
		color: #FFFFFF;
		border: 1px solid #FFF;
		border-radius: 10px;
		padding-left: 10px;
		padding-right: 10px;
	}

	.oneShow {
		width: 100%;
		height: 800px;
	}

	.dayBox {
		width: calc(100% - 40px);
		background-color: #FFF;
		height: 315px;
		padding: 15px 20px;
	}

	.dayTop {
		width: 100%;
		height: 50px;
		border-bottom: 1px solid #E2E2E2;
		font-size: 12px;
		color: #333333;
	}

	.dayTop img {
		width: 10px;
		height: 5px;
	}

	.dayTop .left {
		width: 50%;
		height: 100%;
	}

	.dayTop .right {
		width: 30%;
		height: 100%;
	}

	.dayBox .Lists {
		width: 100%;
		height: 250px;
	}

	.dayBox .Lists .oneTop {
		width: 100%;
		height: 35px;
	}

	.dayBox .oneTop .oneList {
		width: 40%;
		height: 100%;
		font-size: 12px;
		color: #999999;
		font-weight: 500;
	}

	.allBox {
		width: calc(100% - 40px);
		background-color: #FFF;
		height: 240px;
		padding: 15px 20px;
		margin: 10px 0;
	}

	.topOn {
		width: 100%;
		height: 50px;
		border-bottom: 1px solid #E2E2E2;
		font-size: 12px;
		color: #333333;
	}

	.topOn div {
		width: 30%;
		height: 100%;
	}

	.topOn img {
		width: 10px;
		height: 5px;
	}

	.allMoney {
		width: 100%;
		height: 190px;
		margin-top: 10px;
	}

	.oneMoney {
		width: 120px;
		height: 80px;
		margin-bottom: 10px;
		font-size: 12px;
		color: #999999;
		font-weight: 500;
	}

	.twoMoney {
		width: 100%;
		height: 80px;
	}

	.perBox {
		width: calc(100% - 40px);
		background-color: #FFF;
		height: 240px;
		padding: 15px 20px;
		margin-top: 10px;
	}

	.bottAll {
		width: 100%;
		height: 170px;
		margin-top: 10px;
	}

	.oneBot .right .right_l {
		width: 80%;
		height: 100%;
		font-size: 12px;
	}
    </style>
</head>

<body>
    <div id="content">
		

		<div class="oneShow flex_column" >

			<div class="topHead flex_between">
				<div class="leftBox flex_column_around">
					<p style="font-size: 14px;color: #FFF;">{{user.name}}</p>
					<p style="color: #E2E2E2;font-size: 12px;">{{timearry}}</p>
				</div>
				<div class="money" onclick="_url({url: 'frame4/wo_de_yu_e_frame', title: '我的收益', moreTitle:'收支明细'})">
					账户中心
				</div>
			</div>

			<div class="dayBox flex_column">
				<div class="dayTop flex_between">
					<div class="left flex">
						<p>每日数据</p>
						<p style="margin: 0 10px 0 20px;" id="daydata">{{daydata}}</p>
						<img src="../image/img/invite/bott.png" alt="">
					</div>

					<div class="right flex_end">
						<p style="margin-right: 15px;" onclick="_ziji()">{{ziji[0].name}}</p>
						<img src="../image/img/invite/bott.png" alt="">
					</div>
				</div>

				<div class="Lists flex_column_around">
					<div class="oneTop flex_around">
						<div class="oneList flex_column_center">
							<p style="font-size: 14px;color: #FF2265;">{{daydataarr.countshouyi}}</p>
							<p>总收益(积分)</p>
						</div>
						<div class="oneList flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{daydataarr.tuiguang}}</p>
							<p>邀请奖励收益(积分)</p>
						</div>
					</div>
					<div class="oneTop flex_around">
						<div class="oneList flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{daydataarr.video}}</p>
							<p>视频收益(积分)</p>
						</div>
						<div class="oneList flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{daydataarr.sound}}</p>
							<p>语音收益(积分)</p>
						</div>
					</div>
					<div class="oneTop flex_around">
						<div class="oneList flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{daydataarr.chat}}</p>
							<p>私信收益(积分)</p>
						</div>
						<div class="oneList flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{daydataarr.gift}}</p>
							<p>礼物收益(积分)</p>
						</div>
					</div>
					<div class="oneTop flex_around">
						<div class="oneList flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{daydataarr.online}}</p>
							<p>在线用户</p>
						</div>
						<div class="oneList flex_column_center"></div>
					</div>
				</div>
			</div>


			<!-- 累计数据 -->
			<div class="allBox flex_column">
				<div class="topOn flex_between">
					<p>累计数据</p>
					<div class="flex_end">
						<p style="margin-right: 10px;" onclick="_ziji2()">{{ziji2[0].name}}</p>
						<img src="../image/img/invite/bott.png" alt="">
					</div>
				</div>

				<div class="allMoney flex_column_center">
					<div class="oneMoney flex_column_center">
						<p style="font-size: 14px;color: #333333;">{{weekdata.week}}</p>
						<p>本周收益(积分)</p>
					</div>

					<div class="twoMoney flex_around">
						<div class="oneMoney flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{weekdata.last_week}}</p>
							<p>上周收益(积分)</p>
						</div>
						<div class="oneMoney flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{weekdata.yesterday}}</p>
							<p>昨日收益(积分)</p>
						</div>
					</div>

					<p style="font-size: 10px;color: #999999;">ps：数据半小时更新一次</p>
				</div>
			</div>


			<!-- 成员数据 -->
			<div class="perBox flex_column">
				<div class="topOn flex_between">
					<p>累计数据</p>
					<div class="flex_end">
						<p style="margin-right: 10px;" onclick="_ziji3()">{{ziji3[0].name}}</p>
						<img src="../image/img/invite/bott.png" alt="">
					</div>
				</div>

				<div class="bottAll flex_column">
					<div class="twoMoney flex_around">
						<div class="oneMoney flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{countdata.count}}</p>
							<p>累计成员</p>
						</div>
						<div class="oneMoney flex_column_center">
							<p style="font-size: 14px;color: #333333;">{{countdata.yesterdayReg}}</p>
							<p>昨日新增成员</p>
						</div>
					</div>
					<!-- <div class="twoMoney flex_around">
						<div class="oneMoney flex_column_center">
							<p style="font-size: 14px;color: #333333;">332</p>
							<p>昨日登录</p>
						</div>
						<div class="oneMoney flex_column_center">
							<p style="font-size: 14px;color: #333333;">2</p>
							<p>昨日在线时长(h)</p>
						</div>
					</div> -->
				</div>
			</div>
		</div>












	</div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript" src="../script/ffkj.js"></script>
<script type="text/javascript" src="../script/update.js"></script>
<script type="text/javascript" src="../script/swiper.js"></script>
<script type="text/javascript" src="../script/jdate.min.js"></script>
<script src="../script/select_json.js"></script>
<script type="text/javascript" src="../json/imglist.js"></script>
<script type="text/javascript" src="../json/user.js"></script>
<script type="text/javascript" src="../json/rw.js"></script>
<script type="text/javascript">
    var userid;
    var closeid;
    var imgurls = [];
    var view = new Vue({
        el: '#content',
        data: {
            
            imgUrl: imgurl,
            imgList: [],
            bigImgList: [],
            upType: 0, // 0图片 1视频
            ios: 1, // 1上架 0非上架
            vipdate: [],
            rwList: rwJson.data[0],

            showNoble: 0,
			signModal: false,
            sMsg: '',
			qdao:{},

			oneActive:0,
			user:{},
			timearry:'',
			daydata:'',
			ziji:[{"name":'好友',"id":0}],
			ziji2:[{"name":'好友',"id":0}],
			ziji3:[{"name":'好友',"id":0}],
			daydataarr:{},
			weekdata:{'week':0,'last_week':0,'yesterday':0},
			countdata:{'count':0,'yesterdayReg':0},

        },
        methods: {
			onActive(e){
				this.oneActive=e
			},
            copyTxt(text) {
                copyTxt(text);
            },
            _url(param, url) {
                _url(param, url);
            },
            // 返回图片路径
            returnImg(url) {
                return returnImg(url);
            },

        }
    });

    apiready = function() {
        view.ios = $api.getStorage('shang');
        userid = $api.getStorage('userid');
        $api.fixStatusBar($api.dom('header'));
    	view.user=$api.getStorage('user');
		setInterval(()=>{
			var dat=new Date()
			var year = dat.getFullYear();
			var mon = (dat.getMonth()+1) < 10 ? "0"+(dat.getMonth()+1) : dat.getMonth()+1;
			var data = dat.getDate()  < 10 ? "0"+(dat.getDate()) : dat.getDate();
			var hour = dat.getHours()  < 10 ? "0"+(dat.getHours()) : dat.getHours();
			var min =  dat.getMinutes()  < 10 ? "0"+(dat.getMinutes()) : dat.getMinutes();
			var seon = dat.getSeconds() < 10 ? "0"+(dat.getSeconds()) : dat.getSeconds();
			view.timearry=year +"-"+ mon +"-"+ data +" "+ hour +":"+ min +":"+ seon;
			view.daydata=year +"-"+ mon +"-"+ data

		},1000)
		

		new Jdate({
				el: '#daydata',
				format: 'YYYY-MM-DD',
				beginYear: 2000,
				endYear: 2100,
				init: function(e) {
					console.log('插件开始触发');
				},
				moveEnd: function(e) {
					console.log('滚动结束');
				},
				confirm: function(date) {
					console.log(date)
					view.daydata=date
					_daydata()
					console.log('确定按钮触发');
				},
				cancel: function(e) {
					console.log('插件运行取消');
				}
			})

			_daydata()
			_weekdata()
			_countata()
    };

	function _more() {
        _url({
            url: 'frame4/yaoqing',
            title: '我的邀请'
        })
    }

	function _ziji(){
		var path=[{"name":'好友',"id":0},{"name":view.user.name,"id":1}];
		openUIActionSelector(path, {
        col: 1,
        title: '对象'
    }, function (ret, err) {
        console.log(JSON.stringify(ret))
		if(ret.eventType=='ok'){
		view.ziji=ret.selectedInfo
		_daydata()
		}
	})
	}
	function _ziji2(){
		var path=[{"name":'好友',"id":0},{"name":view.user.name,"id":1}];
		openUIActionSelector(path, {
        col: 1,
        title: '对象'
    }, function (ret, err) {
        console.log(JSON.stringify(ret))
		if(ret.eventType=='ok'){
		view.ziji2=ret.selectedInfo
		_weekdata()
		}
	})
	}
	function _ziji3(){
		var path=[{"name":'好友',"id":0},{"name":view.user.name,"id":1}];
		openUIActionSelector(path, {
        col: 1,
        title: '对象'
    }, function (ret, err) {
        console.log(JSON.stringify(ret))
		if(ret.eventType=='ok'){
		view.ziji3=ret.selectedInfo
		_countata()
		}
	})
	}
	function _daydata() {
        _ajax('api/User/daydata', function(ret, err) {
            if (ret && ret.data) {
                view.daydataarr=ret.data
            } 
        },{
			user_id: $api.getStorage('userid'),
			day:view.daydata,
			user:view.ziji[0].id
		})
    }
	function _weekdata() {
        _ajax('api/User/weekdata', function(ret, err) {
            if (ret && ret.data) {
                view.weekdata=ret.data
            }
        },{
			user_id: $api.getStorage('userid'),
			user:view.ziji2[0].id
		})
    }
	function _countata() {
        _ajax('api/User/countata', function(ret, err) {
            if (ret && ret.data) {
                view.countdata=ret.data
            }
        },{
			user_id: $api.getStorage('userid'),
			user:view.ziji3[0].id
		})
    }

    // 获取用户信息
    function getUserInfo() {
        _getUser(function(ret) {
            view.listData = ret.result;
            var nd = new Date().getDate();
            if ($api.getStorage('showNoble') != nd) {
                $api.setStorage('showNoble', nd);
                view.showNoble = ret.result.noble_grade;
                setTimeout(function() {
                    view.showNoble = 0;
                }, 3000)
            }
        })
    }

    // 联系客服
    function openService() {
        _ajax('api/Member/kefu', function(ret, err) {
            if (ret && ret.data && ret.data.id) {
                _url({
                    touserid: ret.data.id,
                    title: '与客服的聊天',
                    moreType: 1,
                }, 'frame0/liaotian_win')
            } else {
                _msg('暂无法联系客服');
            }
        })
    }


    // 获取签到状态
    function getSign() {
        if ($api.getStorage('shang') == 1) return;
        _ajax('api/task/checkSignIn', function(ret, err) {
            if (ret && ret.data ) {
                showDetail('modal/sign_modal')
            }
        }, {
            user_id: $api.getStorage('userid')
        })
    }


	// 获取签到记录
    function getqdData() {
        _ajax('api/task/qiandaorecords', function(ret, err) {
            if (ret && ret.code == 200) {
                view.qdao = ret.data;
            }
        }, {
            user_id: $api.getStorage('userid')
        })
    }
	function qdsubmit() {
        if (view.qdao.is_sign == 1) return;
        _loading();
        _ajax('api/task/qiandaoAjax', function(ret, err) {
            _loadingClose();
            if (ret.code == 200) {
                view.qdao.is_sign = 1
                view.signModal = true;
                view.sMsg = ret.msg;
                view.qdao.tianshu++;
            } else {
                _msg(ret.msg);
            }
        }, {
            user_id: $api.getStorage('userid')
        })
    }
</script>

</html>